<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('material', function (Blueprint $table) {
            $table->integer('id')->unique()->comment('自增ID');
$table->string('fmaterial', 50)->comment('内码');
$table->string('fnumber', 100)->comment('物料编码');
$table->string('fname', 100)->comment('物料名称');
$table->string('fspecification', 200)->comment('物料规格');
$table->string('funit_number', 50)->comment('单位编码');
$table->string('funit_name', 200)->comment('单位名称');
$table->string('fuseorgid_name', 100)->comment('组织名称');
$table->string('fbaseproperty_number', 100)->comment('物料分组编码');
$table->string('fbaseproperty_name', 200)->comment('物料分组名称');
$table->unsignedTinyInteger('fdocumentstatus')->comment('审核状态');
$table->unsignedTinyInteger('fforbidstatus')->comment('禁用状态');
$table->unsignedTinyInteger('fcasecode')->comment('是否启用箱号');
$table->creatorId();
$table->createdAt();
$table->updatedAt();
$table->deletedAt();

$table->engine='InnoDB';
$table->comment('物料档案');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('material');
    }
};
